|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
>
> Well, "inverse" keyword sets the internal INVERTED_FLAG and just like all
> bit flags it is promoted and then handled by the object intersection code
> itself.
> Consequently an object is either inverted or it is nor. Thus the inverse
> flag is always "optimised" also the correct term would probably be
> "promoted".
As I see this from the source code this is handled differently from object
to object. Most of them just set the INVERTED_FLAG but not all. It is not
possible to do this for CSG objects. Instead POV has to use De Morgans's
law. This means that all members of the CSG get inverted and the CSG type
is changed as follows:
union -> intersection
merge -> intersection
intersection -> merge
This has the consequence that a double-inverted union results in a merge!
So for
#declare O = union{
sphere{<0,0,1>,2}
sphere{<0,0,-1>,2}
pigment{rgbf 0.9} finish{ambient 1}
}
object{O}
and
object{object{O inverse} inverse}
is not the same as in the second version the internal walls are removed.
- Micha
Post a reply to this message
|
![](/i/fill.gif) |